﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Cms.Entity.Resume
{
    public partial class ResumeInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "c_Resume";
        }
        public override string GetInsertSql()
        {
            return "insert into c_Resume ( [ID], [Name], [JobID], [JobName], [Gender], [Birthday], [WorkYear], [CertType], [CertNo], [LiveAddr], [Email], [CurrentSalary], [ExpectSalary], [Mobile], [Telephone], [InputTime]) values ( @ID, @Name, @JobID, @JobName, @Gender, @Birthday, @WorkYear, @CertType, @CertNo, @LiveAddr, @Email, @CurrentSalary, @ExpectSalary, @Mobile, @Telephone, @InputTime)";
        }
        public override string GetUpdateSql()
        {
            return "update c_Resume set  [Name] = @Name, [JobID] = @JobID, [JobName] = @JobName, [Gender] = @Gender, [Birthday] = @Birthday, [WorkYear] = @WorkYear, [CertType] = @CertType, [CertNo] = @CertNo, [LiveAddr] = @LiveAddr, [Email] = @Email, [CurrentSalary] = @CurrentSalary, [ExpectSalary] = @ExpectSalary, [Mobile] = @Mobile, [Telephone] = @Telephone, [InputTime] = @InputTime where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 职位ID
        /// </summary>
        public Int32? JobID
        {
            get;
            set;
        }
        /// <summary>
        /// 应聘的职位名
        /// </summary>
        public String JobName
        {
            get;
            set;
        }
        /// <summary>
        /// 性别
        /// </summary>
        public Int32 Gender
        {
            get;
            set;
        }
        /// <summary>
        /// 出生年月
        /// </summary>
        public DateTime Birthday
        {
            get;
            set;
        }
        /// <summary>
        /// 工作年限
        /// </summary>
        public Int32 WorkYear
        {
            get;
            set;
        }
        /// <summary>
        /// 证件类型
        /// </summary>
        public Int32 CertType
        {
            get;
            set;
        }
        /// <summary>
        /// 证件号
        /// </summary>
        public String CertNo
        {
            get;
            set;
        }
        /// <summary>
        /// 居住地
        /// </summary>
        public String LiveAddr
        {
            get;
            set;
        }
        /// <summary>
        /// 电子邮件
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// 当前工资
        /// </summary>
        public Int32? CurrentSalary
        {
            get;
            set;
        }
        /// <summary>
        /// 期望工资
        /// </summary>
        public Int32? ExpectSalary
        {
            get;
            set;
        }
        /// <summary>
        /// 手机
        /// </summary>
        public String Mobile
        {
            get;
            set;
        }
        /// <summary>
        /// 电话
        /// </summary>
        public String Telephone
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "jobid":
                    this.JobID = (Int32?)value;
                    break;
                case "jobname":
                    this.JobName = (String)value;
                    break;
                case "gender":
                    this.Gender = (Int32)value;
                    break;
                case "birthday":
                    this.Birthday = (DateTime)value;
                    break;
                case "workyear":
                    this.WorkYear = (Int32)value;
                    break;
                case "certtype":
                    this.CertType = (Int32)value;
                    break;
                case "certno":
                    this.CertNo = (String)value;
                    break;
                case "liveaddr":
                    this.LiveAddr = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "currentsalary":
                    this.CurrentSalary = (Int32?)value;
                    break;
                case "expectsalary":
                    this.ExpectSalary = (Int32?)value;
                    break;
                case "mobile":
                    this.Mobile = (String)value;
                    break;
                case "telephone":
                    this.Telephone = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "jobid":
                    return this.JobID;
                case "jobname":
                    return this.JobName;
                case "gender":
                    return this.Gender;
                case "birthday":
                    return this.Birthday;
                case "workyear":
                    return this.WorkYear;
                case "certtype":
                    return this.CertType;
                case "certno":
                    return this.CertNo;
                case "liveaddr":
                    return this.LiveAddr;
                case "email":
                    return this.Email;
                case "currentsalary":
                    return this.CurrentSalary;
                case "expectsalary":
                    return this.ExpectSalary;
                case "mobile":
                    return this.Mobile;
                case "telephone":
                    return this.Telephone;
                case "inputtime":
                    return this.InputTime;
                default:
                    return null;
            }
        }
    }


}
